package com.fymxy.question_bank_management.service.serviceImpl;

import com.fymxy.question_bank_management.mapper.TeacherMapper;
import com.fymxy.question_bank_management.pojo.Teacher;
import com.fymxy.question_bank_management.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {

    @Autowired
    private TeacherMapper teacherMapper;

    @Override
    public int insert(Teacher teacher) {
        return teacherMapper.insert(teacher);
    }

    @Override
    public Teacher teacherLogin(String username, String password) {
        return teacherMapper.teacherLogin(username, password);
    }

    @Override
    public List<String> getTeacherNicknames() {
        return teacherMapper.getTeacherNicknames();
    }

    @Override
    public int update(int No, String name, String email) {
        return  this.teacherMapper.update( No, name,  email);
    }
}
